import { createRouter, createWebHistory } from "vue-router";

import LoginVue from '@/views/Login.Vue'
import studentHomeVue from '@/views/Student/studentHome.Vue'
//import studentHomeClass from '@/views/studentClass.Vue'
//import studentChapterVue from '@/views/studentChapter.Vue'
import studentChatVue from '@/views/Student/studentChat.Vue'
import AdminView from '../views/Admin/AdminHome.vue'
import StudentDetail from '@/views/Admin/DetailComponent/StudentDetail.vue'
import TeacherDetail from '@/views/Admin/DetailComponent/TeacherDetail.vue'
import ClassDetail from '@/views/Admin/DetailComponent/ClassDetail.vue'

import teacherHomeVue from '@/views/Teacher/teacherHome.vue'

import teacherClassCreateVue from "@/views/Teacher/teacherClassCreateVue.vue";
import teacherClassJoinVue from "@/views/Teacher/teacherClassJoinVue.vue";
import teacherCreateClassVue from "@/views/Teacher/teacherCreateClassVue.vue";

import teacherClassCreateMangeVue from '@/views/Teacher/createClassManage/teacherClassCreateMange.vue'
import teacherCreateConversationVue from '@/views/Teacher/createClassManage/teacherCreateConversation.vue'
import teacherCreateAssistVue from '@/views/Teacher/createClassManage/teacherCreateAssist.vue'
import teacherCreateStudentVue from '@/views/Teacher/createClassManage/teacherCreateStudent.vue'
import teacherCreateShowVue from '@/views/Teacher/createClassManage/teacherCreateShow.vue'

import teacherClassJoinMangeVue from "@/views/Teacher/joinClassManage/teacherClassJoinMange.vue"
import teacherJoinConversationVue from "@/views/Teacher/joinClassManage/teacherJoinConversation.vue"
import teacherJoinStudentVue from "@/views/Teacher/joinClassManage/teacherJoinStudent.vue"

import historyChatVue from "@/views/Teacher/historyChat.vue";






const routes = [
    { path: '/', component: LoginVue },
    { path: '/studentHome', component: studentHomeVue },
    //{path:'/studentClass',component:studentHomeClass},
    //{path:'/studentChapter',name:'studentChapter',component:studentChapterVue},
    { path: '/studentChat', name: 'studentChat', component: studentChatVue },

    //admin
    { path: '/adminView', name: 'adminView', component: AdminView },
    { path: '/studentDetails/:id', name: 'studentDetails', component: StudentDetail, props: true },
    {
        path: '/TeacherDetail/:id',
        name: 'teacherDetail',
        component: TeacherDetail, props: true
    },
    {
        path: '/classDetail/:id',
        name: 'classDetail',
        component: ClassDetail,
        props: true
    },
    //{ path: '/teacherHome', component: teacherHomeVue },
    //teacher
    { path: '/teacherHome', component: teacherHomeVue ,
    children:[
        {path: '/teacherClassCreate', component: teacherClassCreateVue },
        {path: '/teacherClassJoin', component: teacherClassJoinVue },
        {path: '/teacherCreateClass', component: teacherCreateClassVue },
    ]},
    { path: '/teacherClassCreateMange', component: teacherClassCreateMangeVue ,
    children:[
        {path: '/teacherCreateConversation', component: teacherCreateConversationVue },
        {path: '/teacherCreateAssist', component: teacherCreateAssistVue },
        {path: '/teacherCreateStudent', component: teacherCreateStudentVue },
        {path: '/teacherCreateShow', component: teacherCreateShowVue },
    ]},
    { path: '/historyChat', name: 'historyChat', component: historyChatVue },

    { path: '/teacherClassJoinMange', component: teacherClassJoinMangeVue ,
    children:[
        {path: '/teacherJoinConversation', component: teacherJoinConversationVue },
        {path: '/teacherJoinStudent', component: teacherJoinStudentVue },
    ]},
]

const router = createRouter({
    history: createWebHistory(),
    routes: routes
})

export default router